const http = require("http");

http.createServer(function(req,res){
    console.log(req.url + "访问了服务器");
    if(req.url === "/login"){

        res.write( "login.html" );
        res.end();
    }else if(req.url === "/register"){

        res.write( "register.html" );
        res.end();
        
    }else{
        res.write("404");
        res.end();
    }
}).listen(3000,function(){
    console.log("挂载成功...")
})




